﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="MerchantAdmin.aspx.cs" Inherits="iMall.AtoZ.GroupOn.MerchantAdmin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" media="screen" href="~/Scripts/jquery-ui-1.8.16/css/redmond/jquery.ui.all.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="~/Scripts/jqGrid/themes/ui.jqgrid.css" />
    <!-- The localization file we need, English in this case -->
    <script type="text/javascript" src="~/Scripts/jqGrid/i18n/grid.locale-cn.js"></script>
    <!-- The jqGrid client-side javascript -->
    <script type="text/javascript" src="~/Scripts/jqGrid/jquery.jqGrid.min.js"></script>
    <script type="text/javascript">
        function loadMerchant() {
            jQuery("#list1")
            .jqGrid({
                url: '~/DoPost/DoPost.aspx?t=10',
                datatype: "json",
                colNames: ['Inv No', 'Date', 'Client', 'Amount', 'Tax', 'Total', 'Notes'],
                colModel: [
             { name: 'id', index: 'id', width: 55 },
             { name: 'invdate', index: 'invdate', width: 90 },
             { name: 'name', index: 'name asc, invdate', width: 100 },
             { name: 'amount', index: 'amount', width: 80, align: "right" },
             { name: 'tax', index: 'tax', width: 80, align: "right" },
             { name: 'total', index: 'total', width: 80, align: "right" },
             { name: 'note', index: 'note', width: 150, sortable: false}],
                jsonReader: {
                    root: "Rows", //arry containing actual data  
                    page: "Page", //current page  
                    total: "Total", //total pages for the query  
                    records: "Records", //total number of records  
                    id: "ID",
                    repeatitems: false
                },
                rowNum: 100,
                rowList: [10, 20, 30, 50, 100],
                pager: '#pager1',
                sortname: 'id',
                viewrecords: true,
                sortorder: "desc",
                caption: "JSON Example"
            })

            .trigger('reloadGrid')

            .navGrid('#pager1', { add: false, edit: false, del: false, search: true });
        }
        $(document).ready(function () {
            loadMerchant();
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table id="list1">
    </table>
    <div id="pager1">
    </div>
</asp:Content>
